/**************************************************
 	dOpsys Week-3
 	Nikolas Bram & Dennis Thomasen
 	20104268     & 20103903
 	Linked list implementation for  the
 	consumer-producer exercise
 **************************************************/
#ifndef _LIST_H
#define _LIST_H

struct node {
	void *elm;
	struct node *next;
};

struct list {
	int length;
	struct node *first;
	struct node *last;
	pthread_mutex_t lock;
};

//The functions
struct list *new_list(void);
void add_list(struct list *, struct node *);
struct node *new_node(void);
struct node *new_node_str(char *);
void remove_list(struct list *);

#endif
